#include"heap.h"

void test() {
	int arr[6] = { 6,4,7,5,8,11 };
	AdjustDown(arr, 6, 0);
	for (int i = 0; i < 6; i++) {
		printf("%d ", arr[i]);
	}
}

void test1() {
	H h;
	int arr[7] = { 7,6,5,4,3,2,1 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	HeapInit(&h, arr, sz);
	PrintHeap(&h);
	PrintLikeTreeHeap(&h);
	HeapPush(&h, 0);
	HeapPush(&h, -1);
	HeapPush(&h, -2);
	HeapPush(&h, 4);
	PrintLikeTreeHeap(&h);

	HeapPop(&h);

	PrintLikeTreeHeap(&h);
}

int main()
{
	test1();

	return 0;
}